package com.cy.ppj.dao.mapper.product;

import com.cy.ppj.model.domian.product.ProductProcess;
import com.cy.ppj.model.enums.Process;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.Date;
import java.util.List;

@Mapper
public interface ProductProcessMapper extends BaseMapper<ProductProcess> {

    void insertBatch(@Param("productId") Long productId, @Param("processes") Process[] processes, @Param("createTime") Date createTime);

    void deleteBatch(@Param("productId") Long productId, @Param("processes") Process[] processes);

    void deleteByProductId(@Param("productId") Long productId);
    
    List<Process> selectProcessByProductId(Long productId);
}
